//q1d.cpp
//This program takes two number and prints hash and dollar signs accordingly.
//
//Binyamin 28 december 2017
//===========================================================================
#include <iostream>

using namespace std;

//1. Prompt the user for two numbers.
//2. Capture the two numbers.
//3. print the hash and dollar signs.
int main()
{
	int k,n; // k - a number insereted by the user.
		 // n - a number insereted by the user.
	int t,i,j; // t,i,j - loopers for the forloop.
	cout << "Please enter two numbers: ";
	cin >> k >> n;
	for(t=0;t<n;t++)
	{
		for(i=0;i<k;i++)
		{
			for(j=0;j<t+1;j++)
				cout << (char)('$' - t%2);
			for(j=0;j<n-t-1;j++)
				cout << (char)('#' + t%2);
			cout << '@';
		}
		cout << endl;
	}
	return 0;
}
//output
//Please enter two numbers: 
//$####@$####@$####@
//##$$$@##$$$@##$$$@
//$$$##@$$$##@$$$##@
//####$@####$@####$@
//$$$$$@$$$$$@$$$$$@
